home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Puzzle
/
feednfrenzy.swf
/
scripts
/
frame_611
/
PlaceObject2_265_136
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2008-09-25
|
1KB
|
49 lines
onClipEvent(enterFrame){
this._x += _global.xgo;
this._y += _global.ygo;
if(this._y > _root.player._y - 500)
{
yit = Math.floor(Math.random() * 371) + 30;
if(this._x < -500)
{
this._x = 900;
this._y = _root.depth._y - yit;
die = 1;
this.gotoAndStop(1);
}
if(this._x > 1000)
{
this._x = -400;
this._y = _root.depth._y - yit;
die = 1;
this.gotoAndStop(1);
}
if(scared < 50)
{
this._y -= 1;
}
if(die == 1)
{
myRadians = Math.atan2(this._y - _root.player._y,this._x - _root.player._x);
xleg = this._x - _root.player._x;
yleg = this._y - _root.player._y;
scared = Math.sqrt(xleg * xleg + yleg * yleg);
this._x += 4;
}
if(_root.player.eat.hitTest(this.eat))
{
die = 0;
reat = new Sound();
reat.attachSound("eatit1");
reat.start(0,1);
this.gotoAndPlay("die");
scoreity = 200;
_root.tools.instascore.text = "+" + scoreity;
_root.tools.instblock._alpha = 0;
_global.scoreit = _global.scoreit * 1 + scoreity;
_global.boost += scoreity / 30;
_root.tools.bar1.gotoAndStop(_global.boost + 1);
}
}
}